#!/usr/bin/env python

Import('env')
Import('env_modules')

env_sproto = env_modules.Clone()

# Thirdparty source files

if env['builtin_sproto']:
	thirdparty_dir = "#thirdparty/sproto/"
	thirdparty_sources = [
		"sproto.c",
	]
	thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
	
	env_sproto.Prepend(CPPPATH=[thirdparty_dir])
	env_sproto.Append(CPPDEFINES=["GODOT_SPROTO"])
	
	env_thirdparty = env_sproto.Clone()
	env_thirdparty.disable_warnings()
	env_thirdparty.add_source_files(env.modules_sources, thirdparty_sources)
	
env_sproto.add_source_files(env.modules_sources, "*.cpp")
